import request from '@/utils/request'

export function findWxUserList(data) {
    return request({
        url: '/wxUsers',
        method: 'get',
        params: data
    })
}
export function findWxUserDetail(id) {
    return request({
        url: '/wxUsers/'+id,
        method: 'get'
    })
}
export function deletedWxUser(id) {
    return request({
        url: '/wxUsers/'+id,
        method: 'delete'
    })
}

export function findMemberList(data) {
    return request({
        url: '/members',
        method: 'get',
        params: data
    })
}

export function saveMember(data) {
    if(data.id == null){
        return request({
            url: '/members',
            method: 'post',
            data: data
        })
    }else{
        return request({
            url: '/members/'+data.id,
            method: 'put',
            data: data
        })
    }

}
export function findMemberDetail(id) {
    return request({
        url: '/members/'+id,
        method: 'get'
    })
}
export function deletedMember(id) {
    return request({
        url: '/members/'+id,
        method: 'delete'
    })
}
